# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1GraphicsInfo do
  @moduledoc """
  Information of the graphics subsystem. * This field provides device information, which is static and will not change over time. * Data for this field is controlled via policy: [ReportDeviceGraphicsStatus](https://chromeenterprise.google/policies/#ReportDeviceGraphicsStatus) * Data Collection Frequency: Only at Upload * Default Data Reporting Frequency: 3 hours - Policy Controlled: Yes * Cache: If the device is offline, the collected data is stored locally, and will be reported when the device is next online: No * Reported for affiliated users only: N/A * Granular permission needed: TELEMETRY_API_GRAPHICS_INFO

  ## Attributes

  *   `adapterInfo` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1GraphicsAdapterInfo.t`, *default:* `nil`) - Output only. Information about the graphics adapter (GPU).
  *   `displayDevices` (*type:* `list(GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1DisplayDevice.t)`, *default:* `nil`) - Output only. Information about the display(s) of the device.
  *   `eprivacySupported` (*type:* `boolean()`, *default:* `nil`) - Output only. Is ePrivacy screen supported or not.
  *   `touchScreenInfo` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1TouchScreenInfo.t`, *default:* `nil`) - Output only. Information about the internal touch screen(s) of the device.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adapterInfo =>
            GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1GraphicsAdapterInfo.t()
            | nil,
          :displayDevices =>
            list(GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1DisplayDevice.t())
            | nil,
          :eprivacySupported => boolean() | nil,
          :touchScreenInfo =>
            GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1TouchScreenInfo.t() | nil
        }

  field(:adapterInfo,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1GraphicsAdapterInfo
  )

  field(:displayDevices,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1DisplayDevice,
    type: :list
  )

  field(:eprivacySupported)

  field(:touchScreenInfo,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1TouchScreenInfo
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1GraphicsInfo do
  def decode(value, options) do
    GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1GraphicsInfo.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1GraphicsInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
